# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ufo-wardriving
pkgver=4
pkgrel=10
groups=('blackarch' 'blackarch-cracker' 'blackarch-wireless')
pkgdesc='Allows you to test the security of wireless networks by detecting their passwords based on the router model.'
url='http://www.ufo-wardriving.com/'
arch=('any')
license=('GPL2')
depends=('python2' 'python2-pyqt4' 'qtwebkit')
source=("https://bitbucket.org/asterixthc/ufo-wardriving-4/downloads/$pkgname-$pkgver.zip")
sha512sums=('1b260281fa78d420550052f92b714a9276715ad1')

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

 cp -a * "$pkgdir/usr/share/$pkgname/"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec python2 /usr/share/$pkgname/ufo.py "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

